<?php

namespace App\Models\Api;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class WorkMessage extends Model
{
    //信息表
    use HasFactory;
    use HasDateTimeFormatter;
    protected $table = 'work_message';
    protected $guarded=[];

    /**
     * @param $user_id
     * @return mixed
     * 通过用户id获取系统信息
     */
    public static function getUserSystemInif($user_id)
    {
        return self::where('user_id',$user_id)->where('message_type','1')->get();
    }


}
